package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order record);

    Order selectByPrimaryKey(Long id);

    List<Order> selectAll();

    int updateByPrimaryKey(Order record);

    void updateStatus(OrderQueryObject qo);

    List<Order> selectForList(QueryObject qo);

    void UpdateOrder(Order order);

    List<Order> selectByUserId(Long userId);

    List<Order> getByStatus(@Param("userId") Long userId, @Param("status") Integer status);

    List<Map> getStatusOrders(@Param("userId") Long userId, @Param("status") Integer status);

    List<Map> countOrder(Long id);
}